package it.graph;


public class ConvPoint{
	
	private int id;
	
	private Double lat,lng;
		
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Double getLat() {
		return lat;
	}

	public void setLat(Double lat) {
		this.lat = lat;
	}

	public Double getLng() {
		return lng;
	}

	public void setLng(Double lng) {
		this.lng = lng;
	}

	private Integer Xpx,Ypx;
	
	public Integer getXpx() {
		return Xpx;
	}

	public void setXpx(Integer xpx) {
		Xpx = xpx;
	}

	public Integer getYpx() {
		return Ypx;
	}

	public void setYpx(Integer ypx) {
		Ypx = ypx;
	}

	public ConvPoint(Integer x, Integer y) {
		this.Xpx = x;
		this.Ypx = y;
		pxToGeo();
	}
	
	private void pxToGeo(){		
		lng = InfoMaps.regolaLongConPixel(GUI.lng, -GUI.deltaX, GUI.zoom, Xpx);
		lat = InfoMaps.regolaLatConPixel(GUI.lat, -GUI.deltaY, GUI.zoom, Ypx);
	}
	
	public String toString() {
		return "" + id;
	}
	
}
